<div class="well">
<fieldset>
<legend>View Employee</legend>
<?if(!empty($all_employee)):?>

<!--
<form class="form-search">
  <div class="input-append">
    <input type="text" class="span8 search-query">
    <button type="submit" class="btn">Search</button>
  </div>
</form>
-->

<?=$system_message;?>
<table class="table table-bordered table-striped">
	<thead>
		<tr>
			<th>Name</th>
			<th>Gender</th>
			<th>Address</th>
			<th>status</th>
			<th>dependents</th>
			<th>Department</th>
			<th>position</th>
			<th>monthly salary</th>
		</tr>
	</thead>
	<tbody>
		<?foreach($all_employee as $ae):?>
			<tr>
				<td><?=strtoupper($ae->lastname).','.ucwords($ae->firstname).' '.strtoupper($ae->firstname[0]);?>.</td>
				<td><?=$ae->gender;?></td>
				<td><?=$ae->address;?></td>
				<td><?=$ae->status;?></td>
				<td><?=$ae->dependents;?></td>
				<td><?=ucwords($ae->dept_name);?></td>
				<td><?=$ae->position;?></td>
				<td style="text-align:right;">&#8369; <?=$money($ae->monthly_salary);?></td>
				<td><a href="<?=site_url('employee/update/'.$ae->id);?>" class="btn btn-mini btn-primary">update</a></td>
			</tr>
		<? endforeach;?>
	</tbody>
</table>
<a href="<?=site_url('employee/add');?>" class="btn btn-success">Add Employee</a>
<?else:?>
	<div class="alert alert-notice">
		<h1>Notice</h1>
		<p>No Employee Records Available!.</p>
	</div>
<?endif;?>
</fieldset>
</div>